home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-11-19 | 8.1 KB | 357 lines | [TEXT/MPS ] |
- /*
- File: ASLMFramework.r
-
- Contains: The ASLM Installer framework
-
- Copyright: © 1993-1994 by Apple Computer, Inc., all rights reserved.
-
- */
-
-
- #include "ASLMDefines.r"
-
- #include "ASLMAssertionRules.r"
- #include "ASLMDescriptionRules.r"
- #include "ASLMErrorRules.r"
- #include "ASLMPackageRules.r"
-
- #include "ASLMAtoms.r"
- #include "ASLMFileSpecs.r"
- #include "ASLMPackages.r"
-
-
- #if INTERNATIONAL
-
- /* -------------------------------------------------------------------------
- Put assertion IDs for each country here
- IntlSLMBase thru IntlSLMBase+199 are available
- ------------------------------------------------------------------------- */
-
- #define isUS IntlSLMBase+0
- #define isFrance IntlSLMBase+1
- #define isGermany IntlSLMBase+3
- #define isItaly IntlSLMBase+4
- #define isHolland IntlSLMBase+5
- #define isSweden IntlSLMBase+7
- #define isSpain IntlSLMBase+8
- #define isDenmark IntlSLMBase+9
- #define isFinland IntlSLMBase+17
-
- #endif
-
- /*******************************************************************************
- ** Rules to determine the country we're running in
- ********************************************************************************/
-
- #if INTERNATIONAL
-
- resource 'inrl' (isFrance)
- {
- format0
- {{
- checkUserFunction {'CNTY', 0, 1},
- addAssertion {{isFrance}}
- }};
- };
-
- resource 'inrl' (isGermany)
- {
- format0
- {{
- checkUserFunction {'CNTY', 0, 3},
- addAssertion {{isGermany}}
- }};
- };
-
- resource 'inrl' (isItaly)
- {
- format0
- {{
- checkUserFunction {'CNTY', 0, 4},
- addAssertion {{isItaly}}
- }};
- };
-
- resource 'inrl' (isHolland)
- {
- format0
- {{
- checkUserFunction {'CNTY', 0, 5},
- addAssertion {{isHolland}}
- }};
- };
-
- resource 'inrl' (isSweden)
- {
- format0
- {{
- checkUserFunction {'CNTY', 0, 7},
- addAssertion {{isSweden}}
- }};
- };
-
- resource 'inrl' (isSpain)
- {
- format0
- {{
- checkUserFunction {'CNTY', 0, 8},
- addAssertion {{isSpain}}
- }};
- };
-
- resource 'inrl' (isDenmark)
- {
- format0
- {{
- checkUserFunction {'CNTY', 0, 9},
- addAssertion {{isDenmark}}
- }};
- };
-
- resource 'inrl' (isFinland)
- {
- format0
- {{
- checkUserFunction {'CNTY', 0, 17},
- addAssertion {{isFrance}}
- }};
- };
-
- /* US is the default if no one else matched */
-
- resource 'inrl' (isUS)
- {
- format0
- {{
- addAssertion {{isUS}}
- }};
- };
-
- #endif
-
- /*******************************************************************************
- ** The Global Framework
- ********************************************************************************/
-
- resource 'infr' (kGlobalFrameworkRsrcID)
- {
- format0
- {{
- #if INTERNATIONAL
- /* -----------------------------------------------------------------
- First, determine the country we're running in
- ----------------------------------------------------------------- */
- pickFirst, {
- /* Put individual country rules here */
- isFrance,
- isGermany,
- isItaly,
- isHolland,
- isSweden,
- isSpain,
- isDenmark,
- isFinland,
- isUS
- },
- #endif
-
- /* -----------------------------------------------------------------
- See if EtherTalk Phase 2 is already installed
- ----------------------------------------------------------------- */
- pickFirst, {
- rCheckForEtherTalk,
- rCheckForEtherTalk2_0,
- rCheckForEtherTalk2_1,
- rCheckForEtherTalkPhase2
- /* Put individual Country Messages here */
- #if INTERNATIONAL
- #endif
- },
-
- /* -----------------------------------------------------------------
- See if there is a system file. If not, inform the user
- ----------------------------------------------------------------- */
- pickFirst, {
- rCheckForAnySystem,
- /* Put individual Country Messages here */
- #if INTERNATIONAL
- #endif
- rAssertNoSystemError
- },
-
- #if GENERATING68K
- #if SYSTEM6
-
- /* -----------------------------------------------------------------
- See if we have system 6.0.5 or higher. If we don't - tell the
- user the bad news.
- ----------------------------------------------------------------- */
- pickFirst, {
- rCheckForSystemAUX,
- rCheckForSystem7,
- rCheckForSystem6,
- /* Put individual Country Messages here */
- #if INTERNATIONAL
- #endif
- rAssertBadSystemError
- },
- #else
-
- /* -----------------------------------------------------------------
- If earlier than system 7 - tell the user
- ----------------------------------------------------------------- */
- pickFirst, {
- rCheckForSystem7,
- /* Put individual Country Messages here */
- #if INTERNATIONAL
- #endif
- rAssertSystem7OnlyError
- },
-
- #endif
- #endif
-
- #if GENERATINGPOWERPC
- /* -----------------------------------------------------------------
- Check to see if running on a PowerPC. If we are not then give an
- error if this is a PowerPC only installer
- ----------------------------------------------------------------- */
- pickFirst, {
- rCheckForSystemPPC,
- #if !GENERATING68K
- rAssertPowerPCOn68KError
- #endif
- },
- #endif
-
- }};
- };
-
- /*******************************************************************************
- ** The Easy Install framework
- ********************************************************************************/
-
- resource 'infr' (kEasyInstallFrameworkRsrcID)
- {
- format0
- {{
-
- /* -----------------------------------------------------------------
- These two rules will set the "newer version" assertion if the
- installed version of ASLM is later then the one we are installing.
- This keeps us from "easy installing" an older version.
- ----------------------------------------------------------------- */
-
- pickFirst, {
- #if GENERATING68K
- rCheckForLater68kASLM,
- #endif
- #if GENERATINGPOWERPC
- rCheckForLaterPPCASLM
- #endif
- },
-
- /* -----------------------------------------------------------------
- Report any errors that occured.
- ----------------------------------------------------------------- */
-
- pickFirst, {
- rReportNoSystemError,
- #if GENERATING68K
- #if SYSTEM6
- rReportBadSystemError,
- #else
- rReportSystem7OnlyError,
- #endif
- #endif
- #if GENERATINGPOWERPC && !GENERATING68K
- rReportPowerPCOn68KError,
- #endif
- rReportNewerVersionError
- },
-
- /* -----------------------------------------------------------------
- By here, we know we have Easy Install, so let's do the
- descriptions.
- ----------------------------------------------------------------- */
- pickAll, {
- /* Put Each Countries descriptions in here */
- #if INTERNATIONAL
- #endif
- /* US Descriptions */
- rAddClickDescription,
- #if GENERATING68K
- rAdd68kASLMDescription,
- #endif
- #if GENERATINGPOWERPC
- rAddPPCASLMDescription
- #endif
- },
-
- /* -----------------------------------------------------------------
- Add the internationalized packages
- ----------------------------------------------------------------- */
- pickAll, {
- /* Put Each Countries Check atoms here */
- #if INTERNATIONAL
- #endif
-
- rAddEtherTalkPackage,
- #if GENERATING68K
- rAddSystem6Package,
- rAddSystem7Package,
- rAddSystemAUXPackage,
- #endif
- #if GENERATINGPOWERPC
- rAddSystemPPCPackage,
- #endif
- }
- }};
- };
-
-
- /*******************************************************************************
- ** The Easy Install framework
- ********************************************************************************/
-
- resource 'infr' (kCustomInstallFrameworkRsrcID)
- {
- format0
- {{
-
- /* -----------------------------------------------------------------
- Report any errors that occured.
- ----------------------------------------------------------------- */
-
- pickFirst, {
- rReportNoSystemError,
- #if GENERATING68K
- #if SYSTEM6
- rReportBadSystemError,
- #else
- rReportSystem7OnlyError,
- #endif
- #endif
- #if GENERATINGPOWERPC && !GENERATING68K
- rReportPowerPCOn68KError,
- #endif
- },
-
- /* -----------------------------------------------------------------
- Add all our custom packages.
- ----------------------------------------------------------------- */
-
- pickAll, {
- rAddEtherTalkCustomPackage,
- #if GENERATING68K
- rAddSystem6CustomPackage,
- rAddSystem7CustomPackage,
- rAddSystemAUXCustomPackage,
- #endif
- #if GENERATINGPOWERPC
- rAddSystemPPCCustomPackage
- #endif
- }
- }};
- };
-